package top.lixunda.ecommerce.server.user.api.entity.db;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * <p>
 * 镇数据库
 * </p>
 *
 * @author Xumda
 * @since 2019-11-19
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("position_town")
public class PositionTownDO extends Model<PositionTownDO> {

    private static final long serialVersionUID=1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 县级市id
     */
    @TableField("county_id")
    private Long countyId;

    /**
     * 镇id
     */
    @TableField("town_id")
    private Long townId;

    @TableField("town_name")
    private String townName;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
